package com.skmusic.sk_network.okhttp.response;

import android.os.Handler;

import com.skmusic.sk_network.okhttp.listener.DisposeDataListener;
import com.skmusic.sk_network.okhttp.listener.DisposeDownloadListener;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

/**
 * Created by smark on 2019/12/9.
 * CallBack基础实现类
 */
public class BaseCommonCallBack implements Callback {

    /**
     * the logic layer exception, may alter in different app
     */
    protected final String RESULT_CODE = "ecode"; // 有返回则对于http请求来说是成功的，但还有可能是业务逻辑上的错误
    protected final int RESULT_CODE_VALUE = 0;
    protected final String ERROR_MSG = "emsg";


    /**
     * the java layer exception, do not same to the logic error
     */
    protected final int NETWORK_ERROR = -1; // the network relative error
    protected final int IO_ERROR = -2; // the JSON relative error
    protected final int JSON_ERROR = -3; // the JSON relative error
    protected final int OTHER_ERROR = -4; // the unknow error
    protected final String EMPTY_MSG = "";



    @Override
    public void onFailure(Call call, IOException e) {

    }

    @Override
    public void onResponse(Call call, Response response) throws IOException {

    }
}
